home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.gsfc.nasa.gov!usenet
- From: koehler@bessta.gsfc.nasa.gov (Bob Koehler)
- Newsgroups: vmsnet.sources.d,comp.lang.c++
- Subject: Re: Problem Reading Records
- Date: 5 Jan 1996 14:19:08 GMT
- Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
- Distribution: world
- Message-ID: <4cjc0s$o6c@post.gsfc.nasa.gov>
- References: <4ceh2g$9hd@govonca3.gov.on.ca>
- Reply-To: koehler@bessta.gsfc.nasa.gov (Bob Koehler)
- NNTP-Posting-Host: bessta.gsfc.nasa.gov
-
-
- In article <4ceh2g$9hd@govonca3.gov.on.ca>, dcassidy@ottawa.net (Derick) writes:
- >Hi...
- >
- >This is going to sound like a real dumb question. First of all, let
- >me give you some background. I am new to the VMS programming
- >environment (but not programming in general) and am having some
- >problems using RMS with C/C++
- >
- >Here is a screen capture of what the file details are:
- >
- >REG.DBS;1 File ID: (34902,27,0)
- >Size: 2828/2828 Owner: [CASSIDYD]
- >Created: 10-AUG-1995 08:21:32.19
- >Revised: 3-JAN-1996 12:27:32.90 (3659)
- >Expires: <None specified>
- >Backup: <No backup recorded>
- >Effective: <None specified>
- >Recording: <None specified>
- >File organization: Indexed, Prolog: 3, Using 2 keys
- >Shelved state: Online
- >File attributes: Allocation: 2828, Extend: 0, Maximum bucket size:
- >4
- > Global buffer count: 0, No version limit
- > Contiguous best try
- >Record format: Variable length, maximum 1960 bytes
- >Record attributes: Carriage return carriage control
- >RMS attributes: None
- >Journaling enabled: None
- >File protection: System:RWED, Owner:RWED, Group:RE, World:R
- >Access Cntrl List: None
- >
- >Total of 1 file, 2828/2828 blocks.
- >
- >What i am trying to do seems very simple. I would like to extract all
- >the records in the REG.DBS file and output them to a standard ASCII
- >file that I can port to my PC. I will then do some analysis on the
- >file.
- >
- >Is reading the records as easy as a sys$get(&fab) command? Or do i
- >have to do a whole lot more?
- >
-
- You should be able to open them as if they were simple sequential files
- and RMS should present the data records to you as if they had been sorted by
- key. For example, if the files are ASCII, you should be able to TYPE them, and
- not worry about the keys. Also CONVERT (accessable via CONV$ utility routines)
- can convert the file from keyed to sequential for you.
-
- First of all, try doing a simple fopen and see what you get. Even if you find
- you have to add RMS options to the fopen to get the file open, you should be
- able to use non-keyed read functions once it's open.
-
- And yes, if you want to , you can sys$get(&fab).
-
- ------------------------------------------------------------------------------
- Bob Koehler | CSC/SSD/MITG
-
-